<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/my.css">
    {% block css %}
    {% endblock %}
</head>
<body>
{% csrf_token %}
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">K8S管理平台</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <div class="namespace">
                <select id="nsSelect">
                </select>
            </div>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a href="{% url 'logout' %}">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item {% block index %}{% endblock %}"><a href="{% url 'index' %}">平台概述</a></li>
                <li class="layui-nav-item {% block k8s %}{% endblock %}">
                    <a class="" href="javascript:">kubernetes</a>
                    <dl class="layui-nav-child">
                        <dd class="{% block k8s_node %}{% endblock %}"><a href="{% url 'k8s:node' %}">Node</a></dd>
                        <dd class="{% block k8s_namespace %}{% endblock %}"><a href="{% url 'k8s:k8s_namespace' %}">Namespace</a></dd>
                        <dd class="{% block k8s_pv %}{% endblock %}"><a href="{% url 'k8s:pv' %}">PersistenVolumes</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item {% block workload %}{% endblock %}">
                    <a href="javascript:;">工作负载</a>
                    <dl class="layui-nav-child">
                        <!-- dd block "layui-this" -->
                        <dd class="{% block workload_deployment %}{% endblock %}"><a href="{% url 'workload:deployment' %}">Deployment</a></dd>
                        <dd class="{% block workload_daemonset %}{% endblock %}"><a href="{% url 'workload:daemonset' %}">DaemonSets</a></dd>
                        <dd class="{% block workload_statefulset %}{% endblock %}"><a href="{% url 'workload:statefulset' %}">Statefulset</a></dd>
                        <dd class="{% block workload_pods %}{% endblock %}"><a href="{% url 'workload:pods' %}">Pods</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item {% block loadbalancer %}{% endblock %}">
                    <a href="javascript:;">负载均衡</a>
                    <dl class="layui-nav-child">
                        <dd class="{% block loadbalancer_service %}{% endblock %}"><a href="{% url 'loadbalancer:service' %}">Service</a></dd>
                        <dd class="{% block loadbalancer_ingress %}{% endblock %}"><a href="{% url 'loadbalancer:ingress' %}">Ingress</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item {% block storage %}{% endblock %}">
                    <a href="javascript:;">存储与配置</a>
                    <dl class="layui-nav-child">
                        <dd class="{% block storage_pvc %} {% endblock %}"><a href="{% url 'storage:pvc' %}">PVC</a></dd>
                        <dd class="{% block storage_configmap %} {% endblock %}"><a href="{% url 'storage:configmap' %}">ConfigMap</a></dd>
                        <dd class="{% block storage_secrets %} {% endblock %}"><a href="{% url 'storage:secrets' %}">Secrets</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        {% block body %}

        {% endblock %}
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        底部固定区域
    </div>
</div>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/layui/layui.js"></script>
<script src="/static/js/my.js"></script>
{% block js %}
{% endblock %}
</body>
</html>